<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>添加文章</title>
    <div th:include="admin/head"></div>
</head>
<body>
<div th:include="admin/header"></div>

<form action="/admin/article/add" method="post">
    <div class="form-group">
        <label for="title">标题</label>
        <input type="text" class="form-control" id="title" name="title" placeholder="标题">
    </div>
    <div class="form-group">
        <label for="cid">分类</label>
        <select name="cid" id="cid" class="form-control">
            <option value="" th:each="item : ${list}" th:value="${item.id}" th:text="${item.title}"></option>
        </select>
    </div>
    <div class="form-group">
        <label for="body">内容</label>
        <textarea class="form-control" rows="3" id="body" name="body"></textarea>
    </div>
    <button type="submit" class="btn btn-default">保存</button>
    <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
</form>

<div th:include="admin/footer"></div>
</body>
</html>